#include "math.h"
#include "SDL/SDL.h"
#include "SDLGraphics.h"
#include "global.h"
#include <stdio.h>
#include <iostream>
#include "itemHandle.cpp"
using namespace std;

extern itemHandle* g_items;

namespace gamemath
{

	float anglefromline(int cx, int cy, int tx, int ty);
	float extendlinex(int cx, int cy, int tx, int ty,int l);
	float extendliney(int cx, int cy, int tx, int ty, int l);
	float angleoffsetx(int x, float angle, int offset);
	float angleoffsety(int y, float angle, int offset);
	Uint32 getpixel(SDL_Surface *surface, int x, int y);
	polarcoord getSpriteGuideOffset(SDL_Surface* sprite, int r, int g, int b);
	float relativepolarx(float r_angle,float n_angle, float length);
	float relativepolary(float r_angle,float n_angle, float length);
	float polarx(float a, float r);
	float polary(float a, float r);
	void parsemap(const char* ImageFileName, char temp[][255],int& rowsize, int& colsize);
};
